package org.wlw.user;

public class TestUser {
	public static void main(String[] args) {
		UserManager um = new UserManager();
		try {
			um.add(new User("ldh","123","刘德华",66));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(new User("zxy","11","张学友",65));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(new User("ldh","123","aa",33));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(new User("xtx","111","谢天笑",54));
  		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(new User("dw","232","窦唯",44));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(new User("zc","323","张楚",33));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		try {
			um.add(4,new User("wf","333","汪峰",33));
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
		System.out.println("------------------------------------");
		um.list();
		System.out.println("=----------------------------------");
		try {
			User lu = um.login("ldh","123");
			System.out.println("欢迎"+lu.getNickname()+"使用我们的系统");
		} catch(UserException e) {
			System.out.println(e.getMessage());
		}
	}
}
